var status = -1;

function action(d, b, a) {
    status++;
    if (cm.isQuestFinished(37163)) {
        cm.removeAll(4036501)
    }
    if (cm.isQuestFinished(37164)) {
        cm.removeAll(4036502);
        cm.removeAll(2630159)
    }
    var c = cm.getInfoQuest(37162);
    if (c == null || !c.equals("light=on")) {
        cm.fieldEffect_InsertCanvas(1, 150, 0, 0, 0, 100, 0)
    }
    cm.dispose()
}

function start() {
    status = -1;
    action(1, 0, 0)
};